
#pragma once

#ifndef UDBLOFTEDSURF_H
#define UDBLOFTEDSURF_H

#include "zdbsurf.h"

#pragma pack(push, 8)

class UcDbLoftedSurface: public UcDbSurface
{
public:
    UcDbLoftedSurface ();
    virtual ~UcDbLoftedSurface();
    UCDB_DECLARE_MEMBERS(UcDbLoftedSurface);
    virtual Ucad::ErrorStatus createLoftedSurface (
        UcArray<UcDbEntity*>& crossSectionCurves,
        UcArray<UcDbEntity*>& guideCurves,
        UcDbEntity* pPathCurve, UcDbLoftOptions& loftOptions );
    int           numCrossSections () const;
    UcDbEntity*   getCrossSection ( int idx ) const;
    int           numGuideCurves () const;
    UcDbEntity*   getGuideCurve ( int idx ) const;
    UcDbEntity*   getPathEntity () const;
    void          getLoftOptions ( UcDbLoftOptions& loftOptions ) const;
    Ucad::ErrorStatus  setLoftOptions ( const UcDbLoftOptions& loftOptions );
    virtual void list() const;

	virtual Ucad::ErrorStatus dwgInFields(UcDbDwgFiler* pFiler);
	virtual Ucad::ErrorStatus dwgOutFields(UcDbDwgFiler* pFiler) const;
	virtual Ucad::ErrorStatus dxfInFields(UcDbDxfFiler* pFiler);
	virtual Ucad::ErrorStatus dxfOutFields(UcDbDxfFiler* pFiler) const;

    virtual Ucad::ErrorStatus getClassID(CLSID* pClsid) const;

    virtual Ucad::ErrorStatus getGripPoints ( UcGePoint3dArray&  gripPoints,
                                              UcDbIntArray&  osnapModes,
                                              UcDbIntArray &  geomIds ) const;
    virtual Ucad::ErrorStatus getGripPoints ( UcDbGripDataPtrArray& grips,
                                              const double curViewUnitSize,
                                              const int gripSize,
                                              const UcGeVector3d& curViewDir,
                                              const int bitflags ) const;
    virtual Ucad::ErrorStatus moveGripPointsAt ( const UcDbIntArray& indices,
                                                 const UcGeVector3d& offset );
    virtual Ucad::ErrorStatus moveStretchPointsAt ( const UcDbIntArray& indices,
                                                    const UcGeVector3d& offset );

    virtual Ucad::ErrorStatus getGripEntityUCS ( const void* pGripAppData,
                                                 UcGeVector3d& normalVec,
                                                 UcGePoint3d& origin,
                                                 UcGeVector3d& xAxis ) const;

    virtual bool isDependent() const;

};

#pragma pack(pop)

#endif 
